﻿<%@ Page Language="C#" EnableViewState="false" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="HtmlWeb.Edit" %>

<%@ Register Src="ctl/dh.ascx" TagName="dh" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>采集项目第一步设置</title>
    <link href="style/style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body style="background-color:White;">
    <form id="form1" runat="server">
    <div class="bg2">
<table cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" width="100%">
    <tr>
        <td align="center" bgcolor="#f1f1f1" colspan="2" height="30" nowrap="nowrap">
            <uc1:dh ID="Dh1" runat="server" />
        </td>
    </tr>
  <tr>
    <td width="18%" align="right" nowrap="nowrap" bgcolor="#FFFFFF"><strong>项目名称：</strong></td>
    <td width="77%" bgcolor="#FFFFFF">
        <asp:TextBox ID="TextBox1" runat="server" Width="205px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
            ErrorMessage="(*不能为空)">(*不能为空)</asp:RequiredFieldValidator></td>
  </tr>
    <tr>
        <td align="right" bgcolor="#ffffff" nowrap="nowrap" width="18%">
            <strong>所属网站：</strong></td>
        <td bgcolor="#ffffff" width="77%">
            <asp:TextBox ID="TextBox4" runat="server" ReadOnly="True"></asp:TextBox>
            <span style="color: #ff0000">
            (*在此无法修改,如果要修改此信息,</span><asp:Label ID="Label2" runat="server"></asp:Label><span
                style="color: #ff0000">)</span></td>
    </tr>
  <tr>
    <td align="right" bgcolor="#FFFFFF" style="height: 24px"><strong>目标站点URL：</strong></td>
    <td bgcolor="#FFFFFF" style="height: 24px">
        <asp:TextBox ID="TextBox2" runat="server" Width="204px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
            ErrorMessage="(*不能为空)">(*不能为空)</asp:RequiredFieldValidator></td>
  </tr>
    <tr>
        <td align="right" bgcolor="#FFFFFF">
            <strong>文件存放位置：</strong></td>
      <td bgcolor="#FFFFFF">
        <asp:TextBox ID="TextBox9" runat="server" Width="171px"></asp:TextBox>
            <asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label>
          <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBox9"
              ErrorMessage="(*不能为空)">(*不能为空)</asp:RequiredFieldValidator></td>
    </tr>
  <tr>
    <td align="right" bgcolor="#FFFFFF" style="height: 30px"><strong>所属分类：</strong></td>
    <td bgcolor="#FFFFFF" style="height: 30px">
         <select id="Select1" onchange="setv_s1();">
        </select>
        <select id="Select2" onchange="setv_s2();">
        </select>
        <select id="Select3" onchange="setv();">
        </select>
        <asp:TextBox ID="TextBox3" runat="server" Width="29px">0</asp:TextBox>&nbsp; (<span
            style="color: #ff0000">*<span style="color: #000000">从前面的下拉框<span style="color: #ff0000">选择</span>好分类即可,<span
                style="color: #ff0000">不需要手动输入</span></span></span>)<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3"
            ErrorMessage="(*不能为空)">(*不能为空)</asp:RequiredFieldValidator></td>
  </tr>
  <tr style="color: #000000">
    <td align="right" bgcolor="#FFFFFF"><strong>目标文档编码：</strong></td>
    <td bgcolor="#FFFFFF">
        <asp:DropDownList ID="DropDownList1" runat="server">
            <asp:ListItem Value="0">UTF-8</asp:ListItem>
            <asp:ListItem Selected="True" Value="1">GB2312</asp:ListItem>
        </asp:DropDownList>
        <asp:TextBox ID="TextBox5" runat="server" Width="38px" style="display:none;">2</asp:TextBox></td>
  </tr>
  <tr style="color: #000000">
    <td align="right" bgcolor="#FFFFFF"><strong>采图片站：</strong></td>
    <td bgcolor="#FFFFFF">
        <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal">
            <asp:ListItem Selected="True" Value="0">否</asp:ListItem>
            <asp:ListItem Value="1">是</asp:ListItem>
        </asp:RadioButtonList></td>
  </tr>
  <tr style="color: #000000">
    <td align="right" bgcolor="#FFFFFF"><b>是否启用:</b></td>
    <td bgcolor="#FFFFFF">
        <asp:RadioButtonList ID="RadioButtonList2" runat="server" 
            RepeatDirection="Horizontal">
            <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
            <asp:ListItem Value="0" >否</asp:ListItem>
        </asp:RadioButtonList></td>
  </tr>
  <tr style="color: #000000">
    <td align="right" bgcolor="#FFFFFF"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td bgcolor="#FFFFFF"><div align="center">
        <br />
        <asp:Button ID="Button1" runat="server" Text="修  改" OnClick="Button1_Click" />&nbsp;
    </div></td>
  </tr>
</table>
    </div>
<script type="text/javascript">
function ctl(a)
{
    return document.getElementById(a);
}
var sel_1=ctl("Select1");
var sel_2=ctl("Select2");
var sel_3=ctl("Select3");
var Ji=ctl('<%=this.TextBox5.ClientID %>');

function showdrlist(dr,fuid)
{
    var rpar=HtmlWeb.Edit.mululist(fuid).value;
    var sel=ctl(dr);
    
    if (rpar.length>0)
    {
        sel.style.display='';
        sel.length=0;
        for(var i=0;i<rpar.length;i++)
        {
           sel.options.add(new Option(rpar[i].split('|')[1],rpar[i].split('|')[0]));
        }
        sel.selectedIndex=0;      
    }
    else
    {
        sel.style.display='none';
    }
}
function sd(dr,vl)
{
    var sel=ctl(dr);
    if (sel.length>0)
    {
       for(var i=0;i<sel.length;i++)
       {
            if (sel.options[i].value==vl)
            {
                sel.selectedIndex=i;
                break;
            }
       }
    }
}
function setv()
{
    if (sel_3.length>0)
    {
        Ji.value="3";
        sel_3.style.display='';
        var vl=sel_3.options[sel_3.selectedIndex].value;
        ctl('TextBox3').value=vl;
    }
    else
    {
        Ji.value="2";
        sel_3.style.display='none';
        var vl=sel_2.options[sel_2.selectedIndex].value;
        ctl('TextBox3').value=vl;
    }
}
function setv_s2()
{
    sel_3.length=0;
    showdrlist('Select3',sel_2.options[sel_2.selectedIndex].value);
    setv();
}
function setv_s1()
{
    showdrlist('Select2',sel_1.options[sel_1.selectedIndex].value);
    setv_s2();
}
function showo(s2_id,s2_fid,s1_fid,ji_0)
{
    if (ji_0==2)
    {
        showdrlist('Select1',s1_fid);
        showdrlist('Select2',s2_fid);
        sd('Select1',s2_fid);
        sd('Select2',s2_id);
        setv();
    }
    else  if (ji_0==3)
    {
        showdrlist('Select1',1);//加载第一级
        showdrlist('Select2',s1_fid);//加载第二级
        showdrlist('Select3',s2_fid);//加载第三级
        sd('Select2',s2_fid);
        sd('Select3',s2_id);
        setv();
    }
}
//showdrlist('Select1',1);showdrlist('Select2',sel_1.options[0].value);setv();
</script>
<asp:Label ID="Label3" runat="server" ></asp:Label>
<asp:Label ID="Label4" runat="server" ></asp:Label>
    </form>
</body>
</html>
